import type { AxiosResponse } from "axios";
import http from "./http";

// 定义响应数据的类型  
export interface FileInfo {  
   dir: boolean;
   path: string | null;
   type: string;
}  


export function getFileList(rootPath : string | null) : Promise<AxiosResponse<FileInfo[], any>> {
    return http.get<FileInfo[]>("/file/list", {
        params: {
            rootPath: rootPath,
        }
    }); 
}